package dk.marten.ibdrecord;

import java.util.Calendar;

import android.text.format.DateFormat;

public class ToiletData extends ListData{
	private long id = -1;
	  private int konsistens = 1;
	  private int slim = 0;
	  private int blod = 0;
	  private int trang = 0;

	  public long getId() {
	    return id;
	  }

	  public void setId(long id) {
	    this.id = id;
	  }

	  public int getKonsistens() {
	    return konsistens;
	  }

	  public void setKonsistens(int konsistens) {
	    this.konsistens = konsistens;
	  }

	  public int getSlim() {
	    return slim;
	  }

	  public void setSlim(int slim) {
	    this.slim = slim;
	  }

	  public int getBlod() {
	    return blod;
	  }

	  public void setBlod(int blod) {
	    this.blod = blod;
	  }

	  public int getTrang() {
	    return trang;
	  }

	  public void setTrang(int trang) {
	    this.trang = trang;
	  }
	  
	  public Calendar getDato() {
	    return regDato;
	  }

	  public void setDato(Calendar regDato) {
	    this.regDato = regDato;
	  }
	  
	  public ToiletData(){
		  this.regDato = Calendar.getInstance();
		  
	  }
	  
	  public ToiletData(long id,int tilstand, int slim, int blod, int trang, Calendar regDato) {
		  this.id = id;
		  this.regDato = regDato;
		  toiletData( tilstand, slim, blod, trang);
	  }

		public ToiletData(int tilstand, int slim, int blod, int trang, Calendar regDato) {
			this.regDato = regDato;
			toiletData( tilstand, slim, blod, trang);
		}
		
		public ToiletData( int tilstand, int slim, int blod, int trang) {
			toiletData( tilstand, slim, blod, trang);
		}
		
		private void toiletData(int tilstand,int slim, int blod, int trang) {
			this.konsistens = tilstand;
			this.slim = slim;
			this.blod = blod;
			this.trang = trang;
		}

	  // Will be used by the ArrayAdapter in the ListView
	  @Override
	  public String toString() {
	    return (String) DateFormat.format("dd/MM/yyyy h:mm", regDato) + ", " +id;
	  }
}
